package logic

import (
	"context"
	"month/videosvr/internal/service"

	"month/videosvr/internal/svc"
	"month/videosvr/video"

	"github.com/zeromicro/go-zero/core/logx"
)

type DelVideoLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewDelVideoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DelVideoLogic {
	return &DelVideoLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// todo 笔记删除
func (l *DelVideoLogic) DelVideo(in *video.DelVideoReq) (*video.DelVideoRes, error) {
	// todo: add your logic here and delete this line
	err := service.DelVideo(int(in.Id))
	if err != nil {
		return &video.DelVideoRes{}, err
	}
	return &video.DelVideoRes{}, nil
}
